<template>
  <div id="app">
    <IndexTop></IndexTop>
    <IndexMain></IndexMain>
    <IndexBottom></IndexBottom>
  </div>
</template>

<script>
// // 导入自定义标签
import IndexTop from "./components/index-top.vue";
import IndexMain from "./components/index-main.vue";
import IndexBottom from "./components/index-bottom.vue";

// 导入定义得请求接口
import { waimai_login, waimai_tuan, waimai_index } from "./api";

export default {
  name: "App",
  data() {
    return {
     
    };
  },
  components: {
    IndexTop,
    IndexMain,
    IndexBottom,
  },
 

  beforeCreate() {
    // console.log("组件创建前");
  },
  created() {
    // console.log("组件创建完成");
  },
  beforeMount() {
    // console.log("组件挂载前");
  },
  mounted() {
    // console.log('组件挂载完成');

    // ==================发送请求
    // 发送首页渲染请求
    waimai_index({}).then((res) => {
      console.log(res.data);
    });

    // 发送爆爆团数据请求
    waimai_tuan({ status: 1 }).then((res) => {
      console.log(res.data);
    });
  },
  beforeUpdate() {
    // console.log("组件更新前");
  },
  updated() {
    // console.log("组件更新完成");
  },
  beforeDestroy() {
    // console.log("组件销毁前");
  },
  destroyed() {
    // console.log("组件销毁完成");
  },
};
</script>

<style>
* {
  padding: 0;
  margin: 0;
}
</style>
